package com.joysuch.wwyt.bp.controller;

import com.joysuch.wwyt.bp.service.BpRedisService;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ZhangDong
 * @Date 2020/12/29 10:13
 */
@RestController
@RequestMapping("/bp/redis")
@Api(tags = "/bp/redis")
public class BpRedisController {

    @Autowired
    private BpRedisService bpRedisService;

    @GetMapping("remove-string-key")
    @ApiOperation("删除redis String key")
    public ResultBean removeStringKey(String key) {
        return bpRedisService.removeStringKey(key);
    }

    @GetMapping("remove-map-key")
    @ApiOperation("删除redis Map key")
    public ResultBean removeMapKey(String key) {
        return bpRedisService.removeMapKey(key);
    }

}
